* Results in Pedroza & Losada (2025) using StataNow/MP 18.5

/// Request data file from IPUMS: https://www.atusdata.org/atus-action/variables/search

* samples: 2010-2020
* File Type:                    hierarchical
* Case Selection:               No
* Sample Members:               Respondents and Household Members

* variables: RECTYPE YEAR CASEID SERIAL REGION STATEFIP METRO METAREA COUNTY FAMINCOME PERNUM LINENO WT06 RWT06 WT20 MONTH DAY AGE SEX RACE HISPAN MARST YRIMMIG CITIZEN BPL MBPL FBPL RELATE EDUC EMPSTAT UHRSWORKT_CPS8 YNGCH NCHLT5 ACTLINE ACTIVITY WHERE DURATION_EXT DURATION

* ATUS-IPUMS Citation: Sarah M. Flood, Liana C. Sayer and Daniel Backman. American Time Use Survey Data Extract Builder: Version 3.1 [dataset]. College Park, MD: University of Maryland and Minneapolis, MN: IPUMS, 2022. https://doi.org/10.18128/D060.V3.1

/// place-level identifiers

egen statefip1 	= mean(statefip), by(serial year)
egen region1 	= mean(region)	, by(serial year)
egen met1 		= mean(metro)	, by(serial year)
egen met2 		= mean(metarea)	, by(serial year)
egen county1 	= mean(county)  , by(serial year)

drop metro metarea county region statefip

rename statefip1 statefip
rename region1 region
rename met1 metro
rename met2 metarea
rename county1 county

***************** Dependent variables *************

* 21 child activity codes
* using activity data (rectype==3)
gen childactivity		= .
destring rectype, replace
replace childactivity	= 0 if rectype==3
replace childactivity	= 1 if activity>030100 & activity<030400

* dependent variable: number of child-related activities per respondent (countchildact)
* assigned at the household level using person-level activity data
* observations without person weights (wt06==. & wt20==.) set to missing
egen countchildact 		= sum(childactivity), by (serial year)
replace countchildact	= . if wt06==. & wt20==.

* dependent variable: any children's activities (binarychildact)
* assigned to all persons using household-level (countchildact) data
gen binarychildact		= .
replace binarychildact	= 1 if countchildact>=1 & countchildact!=.
replace binarychildact 	= 0 if countchildact==0 

* dependent variable: duration of child activities (sumdurationchildact)
* identify duration of child activities, then assign duration to household level

gen durationchildact 			= duration 	if childactivity==1

egen sumdurationchildact		= sum(durationchildact), by (serial year)
replace sumdurationchildact		= . if wt06==. & wt20==.

drop durationchildact

* dependent variable: developmental care time (countchildancillary)
* ancillary, optional, and potentially important for a child's well-being and development

gen childactancillary			= .
replace childactancillary		= 0 if rectype==3
replace childactancillary		= 1 if activity==030102 | activity==030103 | ///
 activity==030104 | activity==030105 | activity==030106 | ///
 activity==030107 | activity==030108 | activity==030110 | ///
 activity==030199 | activity==030201 | activity==030202 | ///
 activity==030299 | activity==030301

egen countchildancillary 		= sum(childactancillary)	, by (serial year)
replace countchildancillary		= . if wt06==. & wt20==.

* dependent variable: duration of developmental care time (sumdurationancillary)
* identify duration of developmental care time, then assign duration to household level

gen durationancillary			= duration 		if childactancillary==1

egen sumdurationancillary		= sum(durationancillary), by (serial year)
replace sumdurationancillary 	= . if wt06==. & wt20==.

drop childactancillary durationancillary

* dependent variable: child activities taking place outside the home (countchildactout)

gen childactnothome				= .
replace childactnothome			= 0 if where==101 & childactivity==1
replace childactnothome			= 1 if where!=101 & childactivity==1

egen countchildactout			= sum(childactnothome), by(serial year)
replace countchildactout		= . if wt06==. & wt20==.

* dependent variable: duration of child activities outside the home (durationchildactout)
* identify duration of child activities outside home, then assign duration to household level

gen durationactout				= duration 		if childactnothome==1

egen sumdurationactout			= sum(durationactout), by (serial year)
replace sumdurationactout		= . if wt06==. & wt20==.

drop childactnothome durationactout

* any children in household

gen child = 1 if relate==22
replace child = 0 if child==.

egen childhh = sum(child), by(serial year)

gen anychild = 1 if childhh!=. & childhh>0
replace anychild=0 if anychild==.

***************** correlates of time use *************

* single-headed households, family income (categorical), education (categorical), female, households with grandparents or other adults

gen singleHH 		= 1 if marst==6 & relate==10
replace singleHH 	= 0 if singleHH==.
replace singleHH 	= . if rectype==3

egen shhall 		= mean(singleHH), by(serial year)
replace shhall 		= 0 if shhall==.
replace shhall 		= . if rectype==3

gen shh 			= 1 if shhall!=0 & shhall!=.
replace shh 		= 0 if shh==.
replace shh 		= . if rectype==3

gen faminc 			= famincome if famincome<996
egen famin 			= mean(faminc), by(serial year)

gen educ2 			= 1 if educ <20
replace educ2 		= 2 if educ==20 | educ==21
replace educ2 		= 0 if educ>29 & educ <33
replace educ2 		= 3 if educ2==.

gen female 			= sex - 1

gen bachelor 		= 0
replace bachelor 	= 1 if educ2==3

gen working 		= 0
replace working 	= 1 if empstat<3

drop singleHH shhall famincome faminc educ sex empstat

gen hours = 1 if uhrsworkt_cps8>39 & uhrsworkt_cps8<9995
replace hours = 0 if hours==.

drop uhrs

* households with grandparents or other adults

gen grandparent 	            = 1 if relate==24
replace grandparent 	        = 0 if grandparent==.
replace grandparent 	        = . if rectype==3

egen grandparentinhh 		    = sum(grandparent), by(serial year)
replace grandparentinhh  		= 0 if grandparent==.
replace grandparentinhh  		= . if rectype==3

gen binarygrandparentinhh       = 1 if grandparentinhh>0
replace binarygrandparentinhh    = 0 if grandparentinhh==0

gen otheradult 	                = 1 if relate==25 | relate==26 | relate==28 | relate==30

replace otheradult          	= 0 if otheradult==.
replace otheradult          	= . if rectype==3

egen otheradultinhh 		    = sum(otheradult), by(serial year)
replace otheradultinhh  		= 0 if otheradult==.
replace otheradultinhh  		= . if rectype==3

gen binaryotheradultinhh        = 1 if otheradultinhh>0
replace binaryotheradultinhh    = 0 if otheradultinhh==0

drop grandparent grandparentinhh otheradult otheradultinhh

/// Hispanic citizenship indicators

* noncitizen of any race/ethnicity (person level)
gen noncitizenbinary		= .
replace noncitizenbinary	= 1 if citizen==5 
replace noncitizenbinary	= 0 if citizen==1 | citizen==2 | citizen==3 | citizen==4

* Hispanic noncitizen (person level)
gen hisnoncitizen			= .
replace hisnoncitizen		= 1 if noncitizenbinary==1 & hispan!=100
replace hisnoncitizen		= 0 if noncitizenbinary==0 & hispan==100

* count of hispanic noncitizens in household - applied to persons and households**
egen hhcitizenship			= sum(hisnoncitizen), by(serial year)
replace hhcitizenship		= . if rectype==3

* at least one hispanic noncitizen in household - applied to persons and households*
gen hhnoncitizenbinary		= .
replace hhnoncitizenbinary	= 1 if hhcitizenship>0
replace hhnoncitizenbinary	= 0 if hhcitizenship==0
replace hhnoncitizenbinary	= . if rectype==3

drop noncitizenbinary hisnoncitizen hhcitizenship

/// year of immigration

* 0 if arrived at least one year before surveyed

gen arrived = 0

replace arrived = 1 if yrimmig==43 & year==2020

replace arrived = 1 if yrimmig==41 & year==2019
replace arrived = 1 if yrimmig==40 & year==2018

replace arrived = 1 if yrimmig==38 & year==2017
replace arrived = 1 if yrimmig==37 & year==2016

replace arrived = 1 if yrimmig==35 & year==2015
replace arrived = 1 if yrimmig==34 & year==2014

replace arrived = 1 if yrimmig==32 & year==2013
replace arrived = 1 if yrimmig==31 & year==2012

replace arrived = 1 if yrimmig==29 & year==2011
replace arrived = 1 if yrimmig==28 & year==2010

/// five groups by race, ethnicity, and citizenship

gen group = .
replace group = 1 if race==100 & hispan==100 & hhnoncitizenbinary==0 
replace group = 2 if race==110 & hispan==100 & hhnoncitizenbinary==0 
replace group = 3 if race==131 & hispan==100 & hhnoncitizenbinary==0
replace group = 4 if hispan!=100 & hhnoncitizenbinary==0
replace group = 5 if hispan!=100 & hhnoncitizenbinary==1

label var group "race-ethnicity and U.S. citizenship"
label define groupl 1 "White, non-Hisp, US citizenship" 2 "Black, non-Hisp, US citizenship" ///
3 "Asian, non-Hisp, US citizenship" 4 "Hispanic, US citizenship" 5 "Hispanic noncitizen household"
label value group groupl

sort statefip year

* Mexico Born and Likely Unauthorized

gen likely = 0
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 20000 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 21030 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 21040 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 21050 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 26010 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 30025 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 30030 & group == 5 & yrimmig>7 & hispan!=100
replace likely = 1 if citizen == 5 & educ2 == 1 & bpl == 30065 & group == 5 & yrimmig>7 & hispan!=100
replace likely  = . if group!=5 & citizen!=5

egen likelyHH = sum(likely), by(serial year)

gen lu = 0
replace lu = 1 if likelyHH!=0 & likelyHH!=.

* total sample by group before final keep statements

table citizen if bpl==20000 & group==5, stat(mean likely) stat(freq)

///

save "ATUS_IPUMS_analysis.dta", replace

***************** state-level variables *************

merge statefip year using "state_year_variables_prpr.dta"

save "ATUS_IPUMS_analysis_merged.dta", replace

///

use "ATUS_IPUMS_analysis_merged.dta", clear

/// keep observations included in analyses

* keep person-level observations
keep if rectype==2
* keep if residing in US at least one year
keep if arrived==0
* keep if family income data is not missing
keep if famin!=.
* keep if IWS variable is not missing (not available for Washington, DC)
keep if iws!=.
* keep if any own children under 18 in household
keep if yng<18

foreach var in hispct fbpct pov unemp {
	
	sum `var'
	return list
	gen `var'_s = [`var'-r(mean)]/r(sd)

}

gen demog = hispct_s + fbpct_s

gen econ = pov_s + unemp_s

***************** Figure 1 *****************************************************

graph dot ipc if wt06 != 0 & iws != . & yng < 13 & year < 2020 & anychild == 1 [pw=wt06], ///
    over(statename, sort(ipc) descending) scheme(s1mono)

***************** Table 1 ******************************************************

sum 	binarychildact nchlt5 age female shh famin bach working hours binarygrandparentinhh binaryotheradultinhh  	if yng<13 & group!=. & year<2020 & anychild==1 [aw=wt06]
corr 	binarychildact nchlt5 age female shh famin bach working hours binarygrandparentinhh binaryotheradultinhh 	if yng<13 & group!=. & year<2020 & anychild==1 [aw=wt06]

***************** Table 2 ******************************************************

table group if yng<13 & anychild==1 [pw=wt06], stat(mean binarychildact) stat(mean countchildact) ///
stat(mean countchildancillary) stat(mean countchildactout) stat(freq)

ttest binarychildact if group==1 | group==5, by(group)
ttest binarychildact if group==2 | group==5, by(group)
ttest binarychildact if group==3 | group==5, by(group)
ttest binarychildact if group==4 | group==5, by(group)

ttest countchildact if group==1 | group==5, by(group)
ttest countchildact if group==2 | group==5, by(group)
ttest countchildact if group==3 | group==5, by(group)
ttest countchildact if group==4 | group==5, by(group)

ttest countchildancillary if group==1 | group==5, by(group)
ttest countchildancillary if group==2 | group==5, by(group)
ttest countchildancillary if group==3 | group==5, by(group)
ttest countchildancillary if group==4 | group==5, by(group)

ttest countchildactout if group==1 | group==5, by(group)
ttest countchildactout if group==2 | group==5, by(group)
ttest countchildactout if group==3 | group==5, by(group)
ttest countchildactout if group==4 | group==5, by(group)

***************** Table 3 ******************************************************

* replication weights (rwt06*) applied using svset where iw=wt06

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

* five main models

foreach var of varlist binarychildact {

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) replace

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append
}

***************** Table 4 ******************************************************

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg countchildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) replace

svy: reg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationancillary ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
outreg2 using "Table 4.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

/// Tables 4A, 4B, 4C, and 4D in Appendix

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg countchildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) replace

svy: reg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationancillary ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==1, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

///

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg countchildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationancillary ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==2, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

///

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg countchildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationancillary ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==3, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

///

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg countchildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg countchildactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationchildact 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationancillary ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

svy: nbreg sumdurationactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==4, iterate(40)
outreg2 using "Appendix_Table 4_ABCD.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

********************************************************************************
***************** Sensitivity and robustness checks ****************************
********************************************************************************

* we find results similar to the main results in Table 3 among Mexico-born parents in noncitizen Hispanic households
* the main results extend to Mexico-born parents in noncitizen Hispanic households where someone is likely an unauthorized immigrant

* Mexico-born parents in Hispanic noncitizen households (N = 1,705)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & bpl==20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) replace

* Not Mexico-born parents in Hispanic noncitizen households (N = 973)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & bpl!=20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* Mexico-born parents in Hispanic noncitizen households living with someone who is likely an unauthorized immigrant (N = 1,133)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & lu==1 & bpl==20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* Mexico-born parents in Hispanic noncitizen households no household member is likely an unauthorized immigrant (N = 572)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & lu==0 & bpl==20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* Not Mexico-born parents in Hispanic noncitizen households living with someone who is likely an unauthorized immigrant (N = 421)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & lu==1 & bpl!=20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* Not Mexico-born parents in Hispanic noncitizen households no household member is likely an unauthorized immigrant (N = 552)
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5 & lu==0 & bpl!=20000 [aw=wt06]
outreg2 using "Mexico Born and Likely Unauthorized.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* Logistic models yield comparable results in terms of the direction and significance across respondents in Table 3.

logit binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==1 [pw=wt06]
outreg2 using "Logistic Version Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) replace

logit binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==2 [pw=wt06]
outreg2 using "Logistic Version Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

logit binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==3 [pw=wt06]
outreg2 using "Logistic Version Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

logit binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==4 [pw=wt06]
outreg2 using "Logistic Version Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

logit binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==5 [pw=wt06]
outreg2 using "Logistic Version Table 3.xls", bdec(3) rdec(3) alpha(0.001, 0.01, 0.05) symbol (***, **, *) append

* In supplementary analyses, the IPC predicts the number and duration of activities outside the home before we account for a state's demographic context and Census region.

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

svy: reg sumdurationactout 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro iws countiespct gop econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
svy: nbreg countchildact 		ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop econ  day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)
svy: nbreg countchildactout 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop econ  day month if wt06!=0 & yng<13 & anychild==1 & group==5, iterate(40)

* footnote about Cragg and Hurdle models: Results employing Cragg hurdle models – using Stata churdle or craggitt commands – are consistent with this interpretation: IPC positively predicts selection into any activities but not a higher number of activities.

* example churdle model

churdle exponential countchildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==5 [pweight=wt06], ///
select(ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month) ll(0)

* example Cragg model: second tier only includes state-level, immigration-related policy contexts

gen countchildact_cragg = countchildact
replace countchildact_cragg = 1 if countchildact>0

craggit countchildact_cragg ipc citizen year nchlt5 age female educ2 shh famin working hours binarygrandparentinhh binaryotheradultinhh metro region iws countiespct gop demog econ day month ///
if wt06!=0 & yng<13 & anychild==1 & group==5 [pw=wt06], ///
second(countchildact ipc citizen year nchlt5 age female educ2 shh famin working hours binarygrandparentinhh binaryotheradultinhh metro region iws day month)

* we did not find comparable results when pooling all Hispanic residents in the same model and testing an interaction between
* living in a Hispanic noncitizen household and the IPC score

reg binarychildact i.group##c.ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & group>3 & anychild==1 [pw=wt06]

* Results also hold when using ATUS weights (wt06 and wt20) rather than replicate weights.
* 2020 results below exclude "econ" state context

gen weight = .
replace weight = wt06 if year<2020
replace weight = wt20 if year==2020

reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=wt06]
reg binarychildact ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=weight]

* positive association between IPC and direct care for children holds when including an indicator for the 2016 election season 

gen election_2016 		= 0
replace election_2016 	= 1 if year>2015

reg binarychildact i.election_2016 ipc 		i.citizen i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=wt06]

reg binarychildact i.election_2016 ipc 		i.citizen i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=weight]

reg binarychildact i.election_2016##c.ipc 	i.citizen i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=wt06]

reg binarychildact i.election_2016##c.ipc 	i.citizen i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if yng<13 & anychild==1 & group==5 [pw=weight]

* Results when we vary respondent's children's age
* results are retained for respondents with children under age 16, 15, 14, 13, 12, 11, 10, 9, or 8 (p < 0.05) 

svyset [iw=wt06], sdrweight(rwt06_1-rwt06_160) vce(sdr) mse 

foreach var of varlist binarychildact  {

svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<18 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<17 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<16 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<15 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<14 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<13 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<12 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<11 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng<10 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng< 9 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng< 8 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng< 7 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng< 6 & anychild==1 & group==5
svy: reg `var' ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & yng< 5 & anychild==1 & group==5

}

* model robustness results corresponding to Table 3 if group==5 [model specification in Table 3]

mrobust reg binarychildact 			ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & wt06!=. & yng<13 & anychild==1 & group==5 & year<2020

mrobust reg	countchildancillary 	ipc i.citizen i.year i.nchlt5 age i.female i.educ2 i.shh i.famin i.working hours i.binarygrandparentinhh i.binaryotheradultinhh i.metro i.region iws countiespct gop demog econ day month if wt06!=0 & wt06!=. & yng<13 & anychild==1 & group==5 & year<2020
